import { axios } from '../../utils/request'



const api = {
    listNotFinishMain: '/production/work/listNotFinishMain',
    //   listNotFinishMain: '/production/work/listUnFinishProductionShowVo',
    listNotDispatchedDetail: '/production/work/listNotDispatchedDetail',
    pageSysEmployeeSimpleVo: '/sys/employee/pageSysEmployeeSimpleVo',
    listLeafDetailByMother: '/production/dispatch/listLeafDetailByMother',
    getMaxDispatchTimes: "/production/dispatch/getMaxDispatchTimes",
    save: "/production/dispatch/save",
    getOneByCondition: "/production/dispatch/getOneByCondition",
    delete: "/production/dispatch/delete",
    examine: "/production/dispatch/examine",
    changeWorkId: "/production/dispatch/changeWorkId",
    agetDetailList: "/erp/processRoute/getDetailList",
    getCode: "/production/dispatch/getCode",
}

// 根据车间ID 查询 未完工 单据
export function listNotFinishMain (data) {
    return axios({
        url: api.listNotFinishMain,
        method: "get",
        params: data
    })
}


// 根据未完成单据获取单据明细
export function listNotDispatchedDetail (data) {
    return axios({
        url: api.listNotDispatchedDetail,
        method: "get",
        params: data
    })
}


// 获取派工单编号
export function getCode (data) {
    return axios({
        url: api.getCode,
        method: "get",
        params: data
    })
}

// 查询员工信息
export function pageSysEmployeeSimpleVo (data) {
    return axios({
        url: api.pageSysEmployeeSimpleVo,
        method: "get",
        params: data
    })
}

// bomID查询明细
export function listLeafDetailByMother (data) {
    return axios({
        url: api.listLeafDetailByMother,
        method: "get",
        params: data
    })
}

// 获取最大次数
export function getMaxDispatchTimes (data) {
    return axios({
        url: api.getMaxDispatchTimes,
        method: "get",
        params: data
    })
}


// 保存
export function dispatch (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

// 获取加工单
export function getOneByCondition (data) {
    return axios({
        url: api.getOneByCondition,
        method: "get",
        params: data
    })
}

// 删除
export function deleteApi (data) {
    return axios({
        url: api.delete,
        method: "delete",
        params: data
    })
}

// 审核
export function examines (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}


// 变更
export function changeWorkId (data) {
    return axios({
        url: api.changeWorkId,
        method: "post",
        data: data
    })
}

//工艺id h获取工序列表
export function agetDetailList (data) {
    return axios({
        url: api.agetDetailList,
        method: "get",
        params: data
    })
}


//单据提交
export function submitOrder (data) {
    return axios({
        url: '/production/dispatch/submit',
        method: "get",
        params: data
    })
}























